/*
 * Copyright (c)  2020,  DataPipeline
 * All rights reserved.
 *
 * Id:Interceptor.java   2020-07-11 00:36 wanglijun
 */
package cn.datacare.orm.interceptor;

/**
 * <p>
 * Title: 拦截器
 * </p>
 * <p>
 * Description: 拦截器（before,after,exception）
 * </p>
 * <p>
 * Copyright: Copyright (c) 2020
 * </p>
 * <p>
 * Company/Department: DataPipeline
 * </p>
 *
 * @author wanglijun
 * @version 1.0
 * @since 2020-07-11 00:36
 */
public interface Interceptor {
    /***
     * SQL执行
     * @param context
     */
    void before(InterceptorContext context);

    /***
     *  如果正常执行，调用after
     * @param context
     */
    void after(InterceptorContext context);

    /***
     * 如有遇到有异常情况，则调用 exception方法
     * @param context
     * @param  e
     */
    void exception(InterceptorContext context,Exception e);

}
